<?php
/**
 * =======================================
 *   PHP4の場合、scandir関数がないので実装
 *   参考URL：http://itpro.nikkeibp.co.jp/article/COLUMN/20070827/280408/
 *  =======================================
 */
if (!function_exists(scandir)) {
    function scandir($dir_name, $order = '') {
        $dh = opendir($dir_name);
        while ( ($filename = readdir($dh)) !== false) {
            $file_list[] = $filename;
        }

        if ($order) {
            rsort($file_list);
        } else {
            sort($file_list);
        }
        return $file_list;

    }
}

?>